<%@ page contentType="text/html;charset=UTF-8"%><meta http-equiv="Content-Type"
	content="text/html;charset=utf-8" pageEncoding="UTF-8" />
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=8,IE=9,IE=10" />
<meta http-equiv="Expires" content="0">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">
<!-- shortcut icon add by lxh 20160326 
<link rel="shortcut icon" href="${ctxStatic}/images/favicon.ico" /> -->

<script src="${ctxStatic}/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>

<link
	href="${ctxStatic}/bootstrap/2.3.1/css_${not empty cookie.theme.value ? cookie.theme.value : 'cerulean'}/bootstrap.min.css"
	type="text/css" rel="stylesheet" />
<script src="${ctxStatic}/bootstrap/2.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<link href="${ctxStatic}/bootstrap/2.3.1/awesome/font-awesome.min.css" type="text/css"
	rel="stylesheet" />
<!--[if lte IE 7]><link href="${ctxStatic}/bootstrap/2.3.1/awesome/font-awesome-ie7.min.css" type="text/css" rel="stylesheet" /><![endif]-->
<!--[if lte IE 6]><link href="${ctxStatic}/bootstrap/bsie/css/bootstrap-ie6.min.css" type="text/css" rel="stylesheet" />
<script src="${ctxStatic}/bootstrap/bsie/js/bootstrap-ie.min.js" type="text/javascript"></script><![endif]-->
<link href="${ctxStatic}/jquery-select2/3.4/select2.min.css" rel="stylesheet" />
<script src="${ctxStatic}/jquery-select2/3.4/select2.min.js" type="text/javascript"></script>
<link href="${ctxStatic}/jquery-validation/1.11.0/jquery.validate.min.css" type="text/css"
	rel="stylesheet" />
<script src="${ctxStatic}/jquery-validation/1.11.0/jquery.validate.min.js" type="text/javascript"></script>
<link href="${ctxStatic}/jquery-jbox/2.3/Skins/Bootstrap/jbox.min.css" rel="stylesheet" />
<script src="${ctxStatic}/jquery-jbox/2.3/jquery.jBox-2.3.min.js" type="text/javascript"></script>
<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="${ctxStatic}/common/mustache.min.js" type="text/javascript"></script>
<link href="${ctxStatic}/common/andyou.css" type="text/css" rel="stylesheet" />
<script src="${ctxStatic}/common/andyou.js" type="text/javascript"></script>
<script type="text/javascript">
	var ctx = '${ctx}', ctxStatic = '${ctxStatic}';
</script>
<!-- add for lxh 2016-02-28 公共样式-->
<link href="${ctxStatic}/common/style.css" type="text/css" rel="stylesheet" />
<!-- add for lxh 20160305 饼图、竖向图、线图-->
<script src="${ctxStatic}/echart/echarts.min.js" type="text/javascript"></script>
<!-- add for lxh 2016-05-31 -->
<script src="${ctxStatic}/jquery-barcode/jquery-barcode.min.js" type="text/javascript"></script>
<!-- add for lxh 2016-05-31 cookie-->
<script src="${ctxStatic}/jquery-cookie/jquery.cookie1.4.1.js" type="text/javascript"></script>
<!-- add for lxh 2016-05-31 打印表单jquery库-->
<script src="${ctxStatic}/jquery-printarea-2.3.3/jquery.printarea.js" type="text/javascript"></script>
<link rel="Stylesheet" href="${ctxStatic}/jquery-printarea-2.3.3/printarea.css" />
<!-- add for lxh 2016-06-03 打印条形码 jquery库-->
<script src="${ctxStatic}/lodop6.198/LodopFuncs.js" type="text/javascript"></script>

<link rel="Stylesheet" href="${ctxStatic}/jerichotab/css/jquery.jerichotab.css" />
<script type="text/javascript" src="${ctxStatic}/jerichotab/js/jquery.jerichotab.js"></script>


<script type="text/javascript">
	//条形打印js使用该变量
	var ctxStatic = "${ctxStatic}";
	/* 
	add for lgx 20160309
	url :url /workbench/createCommon
	title:标题
	width：宽度
	height：高度
	top：窗口离顶部的距离,可以是百分比或像素(如 100px)
	 */
	function openWorkflowWindow(url, title, width, height, topValue) {
		url = "iframe:" + "${ctx}/" + url;
		topValue = (topValue == '' ? '10%' : '10px');
		top.$.jBox.open(url, title, width, height, {
			persistent : true,
			top : topValue,
			buttons : {
				'关闭' : true
			}
		});
	}

	/* 
	add for lgx 20160309
	url :url /workbench/createCommon
	title:标题
	width：宽度
	height：高度
	top：窗口离顶部的距离,可以是百分比或像素(如 100px)
	 */
	function openWorkflowPrint(url, title, width, height, topValue) {
		url = "iframe:" + "${ctx}/" + url;
		topValue = (topValue == '' ? '10%' : '10px');
		top.$.jBox.open(url, title, width, height, {
			persistent : true,
			top : topValue,
			buttons : {}
		});
	}

	//init
	$(function() {

		//表单页面适应当前打开window窗口高度
		/* $("form[id=inputForm]").parents("html").css({"height":"100%"});
		$("form[id=inputForm]").parents("body").css({"height":"100%"}); */
		$("form[id=inputForm],form[id=searchForm]").parents("html").css({
			"height" : "100%"
		});
		$("form[id=inputForm],form[id=searchForm]").parents("body").css({
			"height" : "100%"
		});

		//重置按钮代码
		$(".reset").click(
				function() {
					var inputs = $(".t-search").find(
							"input[type=text],input[type=hidden]");
					var selects = $(".t-search").find("select");
					inputs.each(function(index, event) {
						$(event).val("");
					});
					selects.each(function(index, event) {
						$(event).val("");
						$(event).parents("td").find(".select2-chosen").text(
								"全部");
					});

					$(this).prev().click();
				});
		//高级查询     显示更多的查询条件
		var showMoreSearch = false;
		if ($("#showMoreSearch").length > 0) {
			showMoreSearch = $("#showMoreSearch").val();
			if (showMoreSearch == 'true') {
				//显示
				$(".toggleShow").attr("src",
						"${ctxStatic}/images/sd/icon91.png");
				$.each($(".t-search tr"), function(i) {
					if (i > 0) {
						this.style.display = 'table-row';
					}
				});
			} else {
				$(".toggleShow").attr("src",
						"${ctxStatic}/images/sd/icon90.png");
				$.each($(".t-search tr"), function(i) {
					if (i > 0) {
						this.style.display = 'none';
					}
				});
				
			}
		}

		//搜索栏是否显示隐藏
		$(".toggleShow")
				.bind("click")
				.click(
						function() {
							$(this)
									.parents("form")
									.find("table tr:gt(0)")
									.toggle(
											"normal",
											function() {
												var isShow = false;
												if ($(this).is(":hidden")) {
													$(".toggleShow")
															.attr("src",
																	"${ctxStatic}/images/sd/icon90.png");
													if ($("#showMoreSearch").length > 0) {
														$("#showMoreSearch")
																.val("false");
													}
												} else {
													//显示
													$(".toggleShow")
															.attr("src",
																	"${ctxStatic}/images/sd/icon91.png");
													if ($("#showMoreSearch").length > 0) {
														$("#showMoreSearch")
																.val("true");
													}

												}
											});
						});

		//查询提交时，重新赋值  查询一页的数据个数
		$("#searchForm").submit(function() {
			var pagesize = $('select[name=pagesize]').val();
			$('#pageSize').val(pagesize);
		});

		//初始化时   分页显示pagesize页面  绑定当前数据
		var pagesize = $('select[name=pagesize]').attr("data-pagesize");
		//$('select[name=pagesize]').val(pagesize);
		$("select[name=pagesize]").find("option[value='" + pagesize + "']")
				.attr("selected", true);
		$(".pagination").find(".select2-chosen").text(pagesize);
		
		//工作流表单tbody和thead同步滚动
		$(".t-body").scroll(function() {
			$(this).prev().scrollLeft($(this).scrollLeft());
		});

	});
	
	//是否禁止select option
	function disabledSelect(tbodyid,disabledfield){
		var trs=$("#"+tbodyid).find("tr:visible");
		if($(trs[0]).hasClass("undata")){
			var options=$("select[name="+disabledfield+"]").find("option");
			$.each(options,function(index,option){
				$(option).removeAttr("disabled");
			});
			
			return false;
		}
		
		var val=$("select[name="+disabledfield+"]").val();
		$("select[name="+disabledfield+"]").find("option[value="+val+"]").siblings().attr("disabled","disabled");
	}
	
</script>





